import { createServer } from 'vite'

import baseConfig from './config/vite.base.config.ts'
import myConfig from '../vite.my.config.ts'

import { mergeObject } from '../src/utils//mergeOptions.ts'

// const rootPath = __dirname
const config = mergeObject(baseConfig, myConfig)
async function startServer() {
  const server = await createServer({
    configFile: false,
    ...config,
  })

  await server.listen()
  server.printUrls()
}

startServer()
